﻿@using System.Web.Mvc.Html
@using GameSchool.HtmlHelpers
@model GameSchool.ViewModels.Project.ListViewModel
@{
    ViewBag.Title = "Verkefnalisti " + Model.currentCourse.Code + @Model.currentCourse.Name + Model.currentCourse.Semester.Year + "-" + Model.currentCourse.Semester.SemesterOfYear; ;
}
<h2>
    Verkefnalisti fyrir @Model.currentCourse.Code, @Model.currentCourse.Name, @Model.currentCourse.Semester.Year-@Model.currentCourse.Semester.SemesterOfYear</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<table class="table table-striped">
    <tr>
        <th>
            Heiti
        </th>
        <th>
            Einkunn
        </th>
        <th>
            Áunnin Stig
        </th>
        <th>
            Rank
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model.projectStudents)
    {
        <tr>
            <td>
                @Html.ActionLink(item.Name, "Return", new { id = item.ProjectID })
            </td>
            <td>
                @string.Format("{0:0.0}", item.Grade)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.EarnedPoints)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Rank)
            </td>
            <td>
                @Html.ActionLink(item.ProjectReturnID == null ? "Skila verkefni" : "Uppfæra skil", "Return", new { id = item.ProjectID }, new { @class = "btn btn-mini" })
            </td>
        </tr>
    }
</table>
